load("//devtools/tools:typescript.bzl", "ts_library", "ts_test_library")
load("//devtools/tools:defaults.bzl", "karma_web_test_suite")

package(default_visibility = ["//visibility:public"])

ts_library(
    name = "component-data-source",
    srcs = ["index.ts"],
    deps = [
        "//devtools/projects/ng-devtools/src/lib/devtools-tabs/diffing",
        "//devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/directive-forest/index-forest",
        "//devtools/projects/protocol",
        "//packages/core",
        "@npm//@angular/cdk",
        "@npm//@angular/material",
        "@npm//@types",
        "@npm//rxjs",
    ],
)

ts_test_library(
    name = "component_data_source_test",
    srcs = glob(["**/*.spec.ts"]),
    deps = [
        ":component-data-source",
        "//devtools/projects/protocol",
        "@npm//@angular/cdk",
    ],
)

# todo(aleksanderbodurri): fix this test suite
karma_web_test_suite(
    name = "test",
    deps = [
        ":component_data_source_test",
        "//packages/common/http",
        "//packages/platform-browser",
        "//packages/platform-browser/animations",
    ],
)
